package developer.zyk.global.common.consts;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * @author zhangyongkang
 * @time 2025/5/15 10:15
 * @description
 */

@Getter
@AllArgsConstructor
public enum FileType {
    PDF(".pdf"),
    IMG(".img"),
    XLSX(".xlsx"),
    DOCX(".docx"),
    MARK_DOWN(".md")
    ;
    private final String type;


    public static FileType queryTypeEnum(String suffix) {
        for (FileType value : values()) {
            if (value.getType().equalsIgnoreCase(suffix)) {
                return value;
            }
        }
        return null;
    }
}

